home *** CD-ROM | disk | FTP | other *** search
- Path: cocoa.brown.edu!cs032137
- From: cs032137@cs.brown.edu (Jeremy Rothman)
- Newsgroups: comp.lang.c++
- Subject: Re: How do I put DIFFERENT classes in the same linked list?
- Date: 8 Apr 1996 14:38:08 GMT
- Organization: Brown University
- Message-ID: <4kb8cg$2mp@cocoa.brown.edu>
- References: <4ka938$bj6@wintermute.ecs.fullerton.edu>
- NNTP-Posting-Host: cslab9a.cs.brown.edu
-
- In article <4ka938$bj6@wintermute.ecs.fullerton.edu>,
- Gil Rosin <grosin@titan> wrote:
- >class A
- > {
- > public:
- > A *next;
- > A *prev;
- > void Print();
- > };
-
- I think that your problem is that you need to make the Print function virtual.
-
- -- Jeremy Rothman
- Jeremy_Rothman@brown.edu
-
-